object NoticeDemo01 {
  def main(args: Array[String]): Unit = {
    /**
     * 案例1：求两个数的最⼤值
     * 案例2：求三个数的最⼤值
     */
    println(max(1, 2))
    println(max(4, 3))
    println(max(1, 2, 3))
    println(max(6, 5, 4))
  }

  def max(n1: Int, n2: Int): Int = {
    if (n1 > n2) return n1 else n2
  }

  def max(n1: Int, n2: Int, n3: Int): Int = {
    var res = if (n1 > n2) n1 else n2
    res = if (n3 > res) n3 else res
    return res
  }
}
